<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var a;
        var num = prompt('请输入一个需要分解质因数的数字')
        if (num > 0) {
            for (a = 2; a <= 9; a++)
             {
                if(num%a==0){
                    num=mum/a;
                }
             }
              
        }
    </script>

</body>

</html>